<!DOCTYPE html>
<html class="pixel-ratio-1" style="background-color: #f1f1f1;">

<head>
    <meta charset="utf-8" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
    <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
    <!-- <meta name="viewport" content="width=375, user-scalabe=no"> -->
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <script src="../../../../public/vendor/flexible/flexible.js"></script>
    <title>新增销售计划</title>
    <link rel="stylesheet" type="text/css" href="../../../../public/vendor/weui/weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../../public/css/common.css" />
    <link rel="stylesheet" type="text/css" href="../../../../public/css/iconfont/iconfont.css" />
    <link rel="stylesheet" href="../../../../public/vendor/weui/jquery-weui.css">
    <link rel="stylesheet" href="../../../../public/vendor/select2/select2.css">
    <link rel="stylesheet" href="../../../../public/css/features/salesplan/writesalesplan.css">
</head>

<body>
    <div id="main-addsalesplan">
        <!-- @submit.prevent="add" -->
        <form id="addsalesplan-form">
            <div class="weui-cells__group weui-cells__group_form">
                <div class="report-contents-item-box">
                    <div class="weui-cell weui-cell_select" style="padding: 15px;" id="search-date">
                        <div class="weui-cell__hd stycon">
                            <label class="weui-label">业务日期<span class="red-900">&nbsp;*</span></label>
                        </div>
                        <div class="weui-cell__bd">
                            <input class="weui-input clearContent" type="text" id="businessTime"
                                placeholder="请选择业务日期..." required emptyTips="请选择业务日期" v-model="bizDate">
                        </div>
                    </div>
                    <div class="weui-cell" style="padding: 15px;">
                        <div class="weui-cell_orgs" style="display: -webkit-flex;align-items: center;">
                            <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                <span>销售组织<span class="red-900">&nbsp;*</span></span>
                            </span>
                            <span class="weui-cell__ft">
                                <select class="weui-select clearContent" id="saleOrgs" style="visibility: hidden;"
                                    v-model="saleOrg.id" required>
                                </select>
                            </span>
                        </div>
                    </div>
                    <div class="weui-cell weui-cell_select" style="padding: 15px;" id="delivery-date">
                        <div class="weui-cell__hd stycon">
                            <label class="weui-label">发货日期<span class="red-900">&nbsp;*</span></label>
                        </div>
                        <div class="weui-cell__bd">
                            <input class="weui-input clearContent" type="text" id="deliveryDate"
                                placeholder="请选择发货日期..." required emptyTips="请选择发货日期" v-model="deliveryDate">
                        </div>
                    </div>
                    <div class="weui-cell" style="padding: 15px;">
                        <div class="weui-cell_orgs" style="display: -webkit-flex;align-items: center;">
                            <span class="weui-cell__hd stycon selcon" style="padding-right: 10px">
                                <span>客户信息<span class="red-900">&nbsp;*</span></span>
                            </span>
                            <span class="weui-cell__ft">
                                <select class="weui-select clearContent" id="selCustomerInfos"
                                    style="visibility: hidden;" v-model="customer.id" required>
                                </select>
                            </span>
                        </div>
                    </div>
                    <div class="weui-cell" style="padding: 15px;">
                        <div class="weui-cell__hd stycon">
                            <label class="weui-label">联系方式<span class="red-900">&nbsp;*</span></span></label>
                        </div>
                        <div class="weui-cell__bd">
                            <input class="weui-input clearContent" type="tel" maxlength="11" id="witnessPhone"
                                placeholder="请输入联系方式..." pattern="REG_PATTERN_PHONE" emptyTips="请输入联系方式"
                                notMatchTips="请输入正确的联系方式" v-model="customer.phoneNum" required>
                        </div>
                    </div>
                    <div class="weui-cell" style="padding: 15px;">
                        <div class="weui-cell__hd"><label class="weui-label">客户地址</label></div>
                        <div class="weui-cell__bd">
                            <input class="weui-input clearContent" type="text" id="customerAddress"
                                v-model="customer.address" placeholder="请输入客户地址...">
                        </div>
                    </div>

                </div>
            </div>
            <div class="report-contents-item-box">
                <div class="weui-cell" style="padding: 0px;text-align: center;">
                    <div class="weui-cell__bd" id="addSalesEntry" v-on:click="addSalesEntry">
                        <div style="padding: 10px;padding-left: 16px;">
                            <span><i class="icon iconfont icon-snh6-writerresume-01 icon-font-size-24 icon-click"
                                    style="font-size: 24px;color:#07c160" aria-hidden="true"></i>添加计划明细</span>
                        </div>
                    </div>
                </div>
            </div>
            <!-- <div class="report-contents-item-box">
                <h4 class="plantails-head" style="padding-top: 10px;padding-bottom: 10px;">计划明细</h4>
            </div> -->

            <div id="salesEntryTem" style="display: none;">
                <div class="report-contents-item-box" v-for="(item, index) in entries" :key="item.seq">
                    <div style="padding-top:15px" class="entrycon">
                        <div class="plantails-head entry">分录1</div>
                    </div>
                    <div class="weui-cell materialinfo ">
                        <!-- <div class="weui-cell__hd"><label class="weui-label">物料</label></div>
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="text" placeholder="请输入物料信息..." required
                                v-model="item.material.id">
                        </div> -->
                        <div class="weui-cell_orgs" style="display: -webkit-flex;align-items: center;">
                            <span class="weui-cell__hd" style="margin-right: 65px;">
                                <span>物料<span class="red-900">&nbsp;*</span></span>
                            </span>
                            <span class="weui-cell__ft">
                                <select class="weui-select clearContent" style="visibility: hidden;"
                                    v-model="item.material.id" required>
                                </select>
                            </span>
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">物料规格</label></div>
                        <div class="weui-cell__bd">
                            <input class="weui-input material-model clearContent" type="text" placeholder="请输入物料规格..."
                                v-model="item.material.model" readonly>
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">基本计量单位</label></div>
                        <div class="weui-cell__bd">
                            <input class="weui-input material-baseMeasureUnit clearContent" type="text"
                                placeholder="请输入基本计量单位..." required v-model="item.material.baseMeasureUnit" readonly>
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">计划辅助数量<span class="red-900">&nbsp;*</span></label>
                        </div>
                        <div class="weui-cell__bd">
                            <input class="weui-input fassistQty clearContent" type="text" placeholder="请输入计划辅助数量..."
                                v-model="item.fassistQty" required>
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div>
                            <div class="weui-uploader__hd">
                                <p class="weui-uploader__title">备注</p>
                                <!-- <div class="weui-uploader__info"><span class="contentcount">0</span>/500</div> -->
                            </div>
                            <div style="width: 325px;">
                                <textarea class="weui-textarea remark clearContent" rows="4" style="font-size: 16px;"
                                    data-plugin="maxlength" data-placement="bottom-right-inside" placeholder="请输入备注..."
                                    v-model="item.remark"></textarea>
                            </div>
                        </div>

                    </div>
                    <div class="weui-cell plantails" style="display: flex;justify-content: space-around;">
                        <div class="operation-button" data-flag="table-click-delete">
                            <i class="icon iconfont icon-snh6-linear-delete icon-font-size-24" style="font-size: 24px;"
                                aria-hidden="true"></i>
                            <!-- <span class="operation-button-text">删除</span> -->
                        </div>
                        <div class="operation-button" data-flag="table-click-edit" style="display: none;">
                            <i class="icon iconfont icon-snh6-edit-no-border icon-font-size-24" style="font-size: 24px;"
                                aria-hidden="true"></i>
                            <span class="operation-button-text">编辑</span>
                        </div>
                    </div>
                </div>
            </div>
            <div id="salesEntry"></div>

            <div class="report-contents-item-box operation ">
                <div class="weui-cell operation-child">
                    <a href="javascript:;" class="weui-btn weui-btn_default"
                        style="width: 38%;border-radius:8px;background-color: #fff;margin-left: 0px;"
                        id="returnMain">取消</a>
                    <a href="javascript:;" class="weui-btn weui-btn_primary"
                        style="width: 60%;border-radius:8px;margin-top: 0px;margin-right: 0px;" id="informationSubmit"
                        v-on:click="submit">提交</a>
                </div>
            </div>
        </form>
    </div>

    <script type="text/javascript" src="../../../../public/vendor/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../../../../public/vendor/vue/vue.min.js"></script>
    <script type="text/javascript" src="../../../../public/vendor/moment/moment.min.js"></script>
    <script type="text/javascript" src="../../../../public/vendor/weui/weui.js"></script>
    <script type="text/javascript" src="../../../../public/vendor/weui/jquery-weui.min.js"></script>
    <script type="text/javascript" src="../../../../public/js/common/iosadaptation.js"></script>
    <script type="text/javascript" src="../../../../public/js/config/utils.js"></script>
    <script type="text/javascript" src="../../../../public/vendor/select2/select2.full.min.js"></script>
    <script type="text/javascript" src="../../../../public/vendor/select2/i18n/zh-CN.js"></script>
    <script type="text/javascript" src="../../../../public/js/common/iosadaptation.js"></script>
    <script type="module" src="../../../../public/js/features/biz/salesplan/writesalesplan.js"></script>
</body>

</html>